import java.util.Scanner;
public class Outer
{
    protected Inner charater;
    protected  String name;
    protected int age;
    protected String sex;
    public void getInfo()
    {
        Scanner sc = new Scanner(System.in);
        System.out.print("年龄:");
        int age = sc.nextInt();
        System.out.print("性别:");
        String sex = sc.next();
        this.age = age;
        this.sex = sex;
        sc.close();
    }
    private class Inner
    {
        //Outer.Inner p = new Inner();
        void sayHello()
        {
            System.out.println("姓名："+name+"，年龄："+age+"，性别："+sex);
        }
    }
    public Outer(String name)
    {
        this.name = name;
        this.getInfo();
        this.charater = new Inner();
    }
    public static void main(String [] args)
    {
        Outer p = new Outer("xxx");
        p.charater.sayHello();
    }
}
